<template>
  <a-card :bordered="false">
    <a-tabs :default-active-key="defaultActiveKey" @change="changeTab">
      <a-tab-pane :tab="item.text" :key="item.value" forceRender v-for="item in sortList"></a-tab-pane>
    </a-tabs>
  </a-card>
</template>

<script>

  export default {
    name: 'TableSort',
    props: {
      sortList: {
        type: Array,
        default: []
      }
    },
    data() {
      return {}
    },
    computed: {
      defaultActiveKey(){
        return this.sortList[0].value
      }
    },
    methods: {
      changeTab(index){
        this.$emit('changeTab', index)
      }
    },
  }
</script>

<style scoped lang="less">
/deep/ .ant-card-body{
  padding: 0;
  margin-bottom: 16px;
}
</style>